<?php echo $this->Session->flash(); ?>


<table  id="tabla"  >
    <thead>
        <tr>
            <th>Id</th>
            <th>Proyecto</th>
            <th>Calificación</th>
            <th>Responsable</th>
            <th colspan="3"></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($evaluaciones as $evaluacion): ?>
            <tr>
                <td><?php echo $evaluacion['InitialEvaluation']['id'] ?></td> 
                <td><?php echo $evaluacion['Proyect']['codigo'] ?></td>
                <td><?php echo $evaluacion['InitialEvaluation']['calificacion_integral'] ?></td>
                <td><?php echo $evaluacion['User']['nombre'] . " " . $evaluacion['User']['primer_apellido'] . " " . $evaluacion['User']['segundo_apellido'] ?></td>
                <td><?php echo $ajax->link('Editar', array('controller' => 'InitialEvaluations', 'action' => 'edit', $evaluacion['InitialEvaluation']['id'], $proyect_id), array('class' => 'actions', 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false)); ?></td>
                <td><?php echo $ajax->link('Eliminar', array('controller' => 'InitialEvaluations', 'action' => 'delete', $evaluacion['InitialEvaluation']['id'], $proyect_id), array('class' => 'actions', 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false), '¿Desea eliminar el registro?'); ?></td>
                <td>
                    <br>
                    <?php echo $html->link('Carta OIM', array('controller' => 'InitialEvaluations', 'action' => 'correction_letter', $evaluacion['InitialEvaluation']['id'], 1), array('class' => 'actions', 'target' => 'blank')); ?>
                    <br>
                    <br>
                    <?php ///echo $html->link('Carta EPSAGRO', array('controller' => 'InitialEvaluations', 'action' => 'correction_letter', $evaluacion['InitialEvaluation']['id'], 2), array('class' => 'actions', 'target' => 'blank')); ?>
                </td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<br>

<?php if ($this->Session->read('estado') == 0 ) echo $ajax->link('Adicionar', array('controller' => 'InitialEvaluations', 'action' => 'add', $proyect_id), array('class' => 'actions', 'update' => 'content', 'complete' => 'cargar()', 'indicator' => 'loading', 'escape' => false), '¿Desea adicionar un nuevo registro?'); ?>
              
